package fangzhiyi.usual;

import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
import java.util.UUID;

/**
 * @author fangzhiyi
 * @version 1.0
 * @date 2025/4/15 15:40
 * @description
 */
public class Test02 {
    public static void main1(String[] args) {
        String str = new String("123");
        StringBuilder s = new StringBuilder(str);
       StringBuilder newS =  s.reverse();
        System.out.println(newS);
    }

    public static void main2(String[] args) {
        Scanner input = new Scanner(System.in);
        int num = input.nextInt();

        String str = String.valueOf(num);
        if (str.length()>5&&str.length()<12){
            if (str.charAt(0)!='0'){
                System.out.println(true);
            }
        }
    }

    public static void main3(String[] args) {
       String str = "jawrwdjajweqeja";
       String del = "ja";
      String newstr= str.replace(del,"");
        System.out.println(newstr);
    }

    public static void main4(String[] args) {
        Random random = new Random();
        double num = random.nextDouble()*100;
        System.out.println(num);
       String newstr = String.format("%.2f", num);
        System.out.println(newstr);
    }

    public static void main5(String[] args) {
        String[] arr = {"asdsfasfsa","sdasqwe","葡萄美酒夜光杯","装逼我就让你飞"};
        for (int i = 0; i < arr.length; i++) {
            if (arr[i].length()>5){
              arr[i] = arr[i].replace(arr[i],"");
            }
        }
        System.out.println(Arrays.toString(arr));
    }

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str = input.nextLine();
        StringBuilder s = new StringBuilder(str);
        String newStr = s.reverse().toString();
        System.out.println(newStr);
    }
}
